<?
define ("LIB_PATH",dirname(__FILE__));
define ("controllers_path",dirname(__FILE__)."/../app/controller");
define ("ApplicationPath",dirname(__FILE__)."/../app/");
define ("errorPages_path",dirname(__FILE__)."/../app/views/default");
define ("views_path",dirname(__FILE__)."/../app/views");
define ("ROUTING_FILE",dirname(__FILE__)."/../app/config/routing.yml");
define ("ROUTES_DIR",dirname(__FILE__)."/../app/config/");
define ("CONF_FILE",dirname(__FILE__)."/../app/config/config.yml");
define ("ModelsPath",dirname(__FILE__)."/../app/models");
define ("HelpersPath",dirname(__FILE__)."/../app/helpers");
define ("PUBLIC_DIR",dirname(__FILE__)."/../public");
define ("HOME","accueil");


define("SITE_ENV","test"); // test ou prod

set_include_path(ApplicationPath. PATH_SEPARATOR . ModelsPath. PATH_SEPARATOR . HelpersPath);

include dirname(__FILE__)."/class_loader.php";

$conf = Spyc::YAMLLoad(CONF_FILE);
if(count($conf["constants"]) > 0){
	 foreach($conf["constants"] as $name=>$value){
		  define($name,$value);
	 }
}
if(count($conf["helpers"]) > 0){
	 foreach($conf["helpers"] as $name){
		  include HelpersPath."/".$name."Helper.php";
	 }
}


?>